"PyQt not installed. GUI not available. Install \"python-qt3\" with the Synaptic Package Manager (Menu: System -> Administration -> Synaptic Package Manager) or run the command \"sudo apt-get install python-qt3\" in a terminal window.")
dialog.run()
dialog.destroy()
except ImportError:
log.error("PyQt not installed. GUI not available. Please check that the PyQt package is installed. Exiting.")
def canEnterGUIMode():
if not prop.gui_build:
log.warn("GUI mode disabled in build.")
return False
elif not os.getenv('DISPLAY'):
log.warn("No display found.")
return False
elif not checkPyQtImport():
log.warn("Qt/PyQt initialization failed.")
return False
return True
def checkPyQtImport():
# PyQt
try:
import qt
except ImportError:
if os.getenv('DISPLAY') and os.getenv('STARTED_FROM_MENU'):
no_qt_message_gtk()
log.error("PyQt not installed. GUI not available. Exiting.")
return False
# check version of Qt
qtMajor = int(qt.qVersion().split('.')[0])
if qtMajor < MINIMUM_QT_MAJOR_VER:
log.error("Incorrect version of Qt installed. Ver. 3.0.0 or greater required.")
USAGE_STD_NOTES1 = ("1. If device or printer is not specified, the local device bus is probed and the program enters interactive mode.", "", "note", False)
USAGE_STD_NOTES2 = ("2. If -p\* is specified, the default CUPS printer will be used.", "", "note", False)